import React, { Component } from 'react';
import HcHeader from '@/components/hcHeader'
import FooterTip from '@/components/footerTip'
import TypeTab from './children/typeTab'
import ProdItem from './children/prodItem'
import {INFO_TIP} from '@/lib/const'
import './index.css'

class Home extends Component {
  constructor(props) {
    super(props);
    this.state = {
      list: [1, 2, 3, 4]
    }
  }
  render() {
    return (
      <div className="home">
        <HcHeader>
          <TypeTab></TypeTab>
        </HcHeader>
        <main>
          <ul>
            {this.state.list.map(v => 
              <li key={v}>
                <ProdItem></ProdItem>
              </li>
            )}
          </ul>
        </main>
        <footer>
          <FooterTip title="温馨提示" content={INFO_TIP}></FooterTip>
        </footer>
      </div>
    )
  }
}

export default Home;